Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
| 2 | "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 6 | <meta name="generator" content="AsciiDoc 8.2.5" /> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 7 | <style type="text/css"> |
| 8 | /* Debug borders */ |
| 9 | p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { |
| 10 | /* |
| 11 | border: 1px solid red; |
| 12 | */ |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | margin: 1em 5% 1em 5%; |
| 17 | } |
| 18 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 19 | a { |
| 20 | color: blue; |
| 21 | text-decoration: underline; |
| 22 | } |
| 23 | a:visited { |
| 24 | color: fuchsia; |
| 25 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 26 | |
| 27 | em { |
| 28 | font-style: italic; |
| 29 | } |
| 30 | |
| 31 | strong { |
| 32 | font-weight: bold; |
| 33 | } |
| 34 | |
| 35 | tt { |
| 36 | color: navy; |
| 37 | } |
| 38 | |
| 39 | h1, h2, h3, h4, h5, h6 { |
| 40 | color: #527bbd; |
| 41 | font-family: sans-serif; |
| 42 | margin-top: 1.2em; |
| 43 | margin-bottom: 0.5em; |
| 44 | line-height: 1.3; |
| 45 | } |
| 46 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 47 | h1, h2, h3 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 48 | border-bottom: 2px solid silver; |
| 49 | } |
| 50 | h2 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 51 | padding-top: 0.5em; |
| 52 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 53 | h3 { |
| 54 | float: left; |
| 55 | } |
| 56 | h3 + * { |
| 57 | clear: left; |
| 58 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 59 | |
| 60 | div.sectionbody { |
| 61 | font-family: serif; |
| 62 | margin-left: 0; |
| 63 | } |
| 64 | |
| 65 | hr { |
| 66 | border: 1px solid silver; |
| 67 | } |
| 68 | |
| 69 | p { |
| 70 | margin-top: 0.5em; |
| 71 | margin-bottom: 0.5em; |
| 72 | } |
| 73 | |
| 74 | pre { |
| 75 | padding: 0; |
| 76 | margin: 0; |
| 77 | } |
| 78 | |
| 79 | span#author { |
| 80 | color: #527bbd; |
| 81 | font-family: sans-serif; |
| 82 | font-weight: bold; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 83 | font-size: 1.1em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 84 | } |
| 85 | span#email { |
| 86 | } |
| 87 | span#revision { |
| 88 | font-family: sans-serif; |
| 89 | } |
| 90 | |
| 91 | div#footer { |
| 92 | font-family: sans-serif; |
| 93 | font-size: small; |
| 94 | border-top: 2px solid silver; |
| 95 | padding-top: 0.5em; |
| 96 | margin-top: 4.0em; |
| 97 | } |
| 98 | div#footer-text { |
| 99 | float: left; |
| 100 | padding-bottom: 0.5em; |
| 101 | } |
| 102 | div#footer-badges { |
| 103 | float: right; |
| 104 | padding-bottom: 0.5em; |
| 105 | } |
| 106 | |
| 107 | div#preamble, |
| 108 | div.tableblock, div.imageblock, div.exampleblock, div.verseblock, |
| 109 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 110 | div.admonitionblock { |
| 111 | margin-right: 10%; |
| 112 | margin-top: 1.5em; |
| 113 | margin-bottom: 1.5em; |
| 114 | } |
| 115 | div.admonitionblock { |
| 116 | margin-top: 2.5em; |
| 117 | margin-bottom: 2.5em; |
| 118 | } |
| 119 | |
| 120 | div.content { /* Block element content. */ |
| 121 | padding: 0; |
| 122 | } |
| 123 | |
| 124 | /* Block element titles. */ |
| 125 | div.title, caption.title { |
| 126 | font-family: sans-serif; |
| 127 | font-weight: bold; |
| 128 | text-align: left; |
| 129 | margin-top: 1.0em; |
| 130 | margin-bottom: 0.5em; |
| 131 | } |
| 132 | div.title + * { |
| 133 | margin-top: 0; |
| 134 | } |
| 135 | |
| 136 | td div.title:first-child { |
| 137 | margin-top: 0.0em; |
| 138 | } |
| 139 | div.content div.title:first-child { |
| 140 | margin-top: 0.0em; |
| 141 | } |
| 142 | div.content + div.title { |
| 143 | margin-top: 0.0em; |
| 144 | } |
| 145 | |
| 146 | div.sidebarblock > div.content { |
| 147 | background: #ffffee; |
| 148 | border: 1px solid silver; |
| 149 | padding: 0.5em; |
| 150 | } |
| 151 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 152 | div.listingblock { |
| 153 | margin-right: 0%; |
| 154 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 155 | div.listingblock > div.content { |
| 156 | border: 1px solid silver; |
| 157 | background: #f4f4f4; |
| 158 | padding: 0.5em; |
| 159 | } |
| 160 | |
| 161 | div.quoteblock > div.content { |
| 162 | padding-left: 2.0em; |
| 163 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 164 | |
| 165 | div.attribution { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 166 | text-align: right; |
| 167 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 168 | div.verseblock + div.attribution { |
| 169 | text-align: left; |
| 170 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 171 | |
| 172 | div.admonitionblock .icon { |
| 173 | vertical-align: top; |
| 174 | font-size: 1.1em; |
| 175 | font-weight: bold; |
| 176 | text-decoration: underline; |
| 177 | color: #527bbd; |
| 178 | padding-right: 0.5em; |
| 179 | } |
| 180 | div.admonitionblock td.content { |
| 181 | padding-left: 0.5em; |
| 182 | border-left: 2px solid silver; |
| 183 | } |
| 184 | |
| 185 | div.exampleblock > div.content { |
| 186 | border-left: 2px solid silver; |
| 187 | padding: 0.5em; |
| 188 | } |
| 189 | |
| 190 | div.verseblock div.content { |
| 191 | white-space: pre; |
| 192 | } |
| 193 | |
| 194 | div.imageblock div.content { padding-left: 0; } |
| 195 | div.imageblock img { border: 1px solid silver; } |
| 196 | span.image img { border-style: none; } |
| 197 | |
| 198 | dl { |
| 199 | margin-top: 0.8em; |
| 200 | margin-bottom: 0.8em; |
| 201 | } |
| 202 | dt { |
| 203 | margin-top: 0.5em; |
| 204 | margin-bottom: 0; |
| 205 | font-style: italic; |
| 206 | } |
| 207 | dd > *:first-child { |
| 208 | margin-top: 0; |
| 209 | } |
| 210 | |
| 211 | ul, ol { |
| 212 | list-style-position: outside; |
| 213 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 214 | div.olist2 ol { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 215 | list-style-type: lower-alpha; |
| 216 | } |
| 217 | |
| 218 | div.tableblock > table { |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 219 | border: 3px solid #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 220 | } |
| 221 | thead { |
| 222 | font-family: sans-serif; |
| 223 | font-weight: bold; |
| 224 | } |
| 225 | tfoot { |
| 226 | font-weight: bold; |
| 227 | } |
| 228 | |
| 229 | div.hlist { |
| 230 | margin-top: 0.8em; |
| 231 | margin-bottom: 0.8em; |
| 232 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 233 | div.hlist td { |
| 234 | padding-bottom: 5px; |
| 235 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 236 | td.hlist1 { |
| 237 | vertical-align: top; |
| 238 | font-style: italic; |
| 239 | padding-right: 0.8em; |
| 240 | } |
| 241 | td.hlist2 { |
| 242 | vertical-align: top; |
| 243 | } |
| 244 | |
| 245 | @media print { |
| 246 | div#footer-badges { display: none; } |
| 247 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 248 | |
| 249 | div#toctitle { |
| 250 | color: #527bbd; |
| 251 | font-family: sans-serif; |
| 252 | font-size: 1.1em; |
| 253 | font-weight: bold; |
| 254 | margin-top: 1.0em; |
| 255 | margin-bottom: 0.1em; |
| 256 | } |
| 257 | |
| 258 | div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { |
| 259 | margin-top: 0; |
| 260 | margin-bottom: 0; |
| 261 | } |
| 262 | div.toclevel2 { |
| 263 | margin-left: 2em; |
| 264 | font-size: 0.9em; |
| 265 | } |
| 266 | div.toclevel3 { |
| 267 | margin-left: 4em; |
| 268 | font-size: 0.9em; |
| 269 | } |
| 270 | div.toclevel4 { |
| 271 | margin-left: 6em; |
| 272 | font-size: 0.9em; |
| 273 | } |
| 274 | include1::./stylesheets/xhtml11-manpage.css[] |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 275 | /* Workarounds for IE6's broken and incomplete CSS2. */ |
| 276 | |
| 277 | div.sidebar-content { |
| 278 | background: #ffffee; |
| 279 | border: 1px solid silver; |
| 280 | padding: 0.5em; |
| 281 | } |
| 282 | div.sidebar-title, div.image-title { |
| 283 | font-family: sans-serif; |
| 284 | font-weight: bold; |
| 285 | margin-top: 0.0em; |
| 286 | margin-bottom: 0.5em; |
| 287 | } |
| 288 | |
| 289 | div.listingblock div.content { |
| 290 | border: 1px solid silver; |
| 291 | background: #f4f4f4; |
| 292 | padding: 0.5em; |
| 293 | } |
| 294 | |
| 295 | div.quoteblock-content { |
| 296 | padding-left: 2.0em; |
| 297 | } |
| 298 | |
| 299 | div.exampleblock-content { |
| 300 | border-left: 2px solid silver; |
| 301 | padding-left: 0.5em; |
| 302 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 303 | |
| 304 | /* IE6 sets dynamically generated links as visited. */ |
| 305 | div#toc a:visited { color: blue; } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 306 | </style> |
| 307 | <title>git-format-patch(1)</title> |
| 308 | </head> |
| 309 | <body> |
| 310 | <div id="header"> |
| 311 | <h1> |
| 312 | git-format-patch(1) Manual Page |
| 313 | </h1> |
| 314 | <h2>NAME</h2> |
| 315 | <div class="sectionbody"> |
| 316 | <p>git-format-patch - |
Junio C Hamano | 0107892 | 2006-03-10 00:31:47 | [diff] [blame] | 317 | Prepare patches for e-mail submission |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 318 | </p> |
| 319 | </div> |
| 320 | </div> |
| 321 | <h2>SYNOPSIS</h2> |
| 322 | <div class="sectionbody"> |
Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 323 | <div class="verseblock"> |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 324 | <div class="content"><em>git format-patch</em> [-k] [-o <dir> | --stdout] [--thread] |
Junio C Hamano | c51fede | 2007-03-12 07:29:20 | [diff] [blame] | 325 | [--attach[=<boundary>] | --inline[=<boundary>]] |
Junio C Hamano | 94cad1a | 2007-06-06 10:48:25 | [diff] [blame] | 326 | [-s | --signoff] [<common diff options>] |
Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 327 | [-n | --numbered | -N | --no-numbered] |
Junio C Hamano | 94cad1a | 2007-06-06 10:48:25 | [diff] [blame] | 328 | [--start-number <n>] [--numbered-files] |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 329 | [--in-reply-to=Message-Id] [--suffix=.<sfx>] |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 330 | [--ignore-if-in-upstream] |
Junio C Hamano | 6f1cca8 | 2007-04-12 05:02:47 | [diff] [blame] | 331 | [--subject-prefix=Subject-Prefix] |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 332 | [--cc=<email>] |
| 333 | [--cover-letter] |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 334 | [ <since> | <revision range> ]</div></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 335 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 336 | <h2 id="_description">DESCRIPTION</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 337 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 338 | <div class="para"><p>Prepare each commit with its patch in |
Junio C Hamano | 341071d | 2006-06-04 07:24:48 | [diff] [blame] | 339 | one file per commit, formatted to resemble UNIX mailbox format. |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 340 | The output of this command is convenient for e-mail submission or |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 341 | for use with <em>git-am</em>.</p></div> |
| 342 | <div class="para"><p>There are two ways to specify which commits to operate on.</p></div> |
| 343 | <div class="olist"><ol> |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 344 | <li> |
| 345 | <p> |
| 346 | A single commit, <since>, specifies that the commits leading |
| 347 | to the tip of the current branch that are not in the history |
| 348 | that leads to the <since> to be output. |
| 349 | </p> |
| 350 | </li> |
| 351 | <li> |
| 352 | <p> |
| 353 | Generic <revision range> expression (see "SPECIFYING |
| 354 | REVISIONS" section in <a href="git-rev-parse.html">git-rev-parse(1)</a>) means the |
| 355 | commits in the specified range. |
| 356 | </p> |
| 357 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 358 | </ol></div> |
| 359 | <div class="para"><p>A single commit, when interpreted as a <revision range> |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 360 | expression, means "everything that leads to that commit", but |
| 361 | if you write <em>git format-patch <commit></em>, the previous rule |
| 362 | applies to that command line and you do not get "everything |
| 363 | since the beginning of the time". If you want to format |
| 364 | everything since project inception to one commit, say "git |
| 365 | format-patch --root <commit>" to make it clear that it is the |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 366 | latter case.</p></div> |
| 367 | <div class="para"><p>By default, each output file is numbered sequentially from 1, and uses the |
Junio C Hamano | 341071d | 2006-06-04 07:24:48 | [diff] [blame] | 368 | first line of the commit message (massaged for pathname safety) as |
Junio C Hamano | 94cad1a | 2007-06-06 10:48:25 | [diff] [blame] | 369 | the filename. With the --numbered-files option, the output file names |
| 370 | will only be numbers, without the first line of the commit appended. |
| 371 | The names of the output files are printed to standard |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 372 | output, unless the --stdout option is specified.</p></div> |
| 373 | <div class="para"><p>If -o is specified, output files are created in <dir>. Otherwise |
| 374 | they are created in the current working directory.</p></div> |
| 375 | <div class="para"><p>If -n is specified, instead of "[PATCH] Subject", the first line |
| 376 | is formatted as "[PATCH n/m] Subject".</p></div> |
| 377 | <div class="para"><p>If given --thread, <em>git-format-patch</em> will generate In-Reply-To and |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 378 | References headers to make the second and subsequent patch mails appear |
| 379 | as replies to the first mail; this also generates a Message-Id header to |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 380 | reference.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 381 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 382 | <h2 id="_options">OPTIONS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 383 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 384 | <div class="vlist"><dl> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 385 | <dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 386 | -p |
| 387 | </dt> |
| 388 | <dd> |
| 389 | <p> |
Junio C Hamano | ff97979 | 2007-11-16 10:11:30 | [diff] [blame] | 390 | Generate patches without diffstat. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 391 | </p> |
| 392 | </dd> |
| 393 | <dt> |
| 394 | -u |
| 395 | </dt> |
| 396 | <dd> |
| 397 | <p> |
| 398 | Synonym for "-p". |
| 399 | </p> |
| 400 | </dd> |
| 401 | <dt> |
Junio C Hamano | 6936156 | 2007-07-26 02:14:34 | [diff] [blame] | 402 | -U<n> |
| 403 | </dt> |
| 404 | <dd> |
| 405 | <p> |
| 406 | Shorthand for "--unified=<n>". |
| 407 | </p> |
| 408 | </dd> |
| 409 | <dt> |
| 410 | --unified=<n> |
| 411 | </dt> |
| 412 | <dd> |
| 413 | <p> |
| 414 | Generate diffs with <n> lines of context instead of |
| 415 | the usual three. Implies "-p". |
| 416 | </p> |
| 417 | </dd> |
| 418 | <dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 419 | --raw |
| 420 | </dt> |
| 421 | <dd> |
| 422 | <p> |
| 423 | Generate the raw format. |
Junio C Hamano | ff97979 | 2007-11-16 10:11:30 | [diff] [blame] | 424 | |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 425 | </p> |
| 426 | </dd> |
| 427 | <dt> |
| 428 | --patch-with-raw |
| 429 | </dt> |
| 430 | <dd> |
| 431 | <p> |
| 432 | Synonym for "-p --raw". |
| 433 | </p> |
| 434 | </dd> |
| 435 | <dt> |
| 436 | --stat[=width[,name-width]] |
| 437 | </dt> |
| 438 | <dd> |
| 439 | <p> |
| 440 | Generate a diffstat. You can override the default |
| 441 | output width for 80-column terminal by "--stat=width". |
| 442 | The width of the filename part can be controlled by |
| 443 | giving another width to it separated by a comma. |
| 444 | </p> |
| 445 | </dd> |
| 446 | <dt> |
| 447 | --numstat |
| 448 | </dt> |
| 449 | <dd> |
| 450 | <p> |
| 451 | Similar to --stat, but shows number of added and |
| 452 | deleted lines in decimal notation and pathname without |
| 453 | abbreviation, to make it more machine friendly. For |
| 454 | binary files, outputs two <tt>-</tt> instead of saying |
| 455 | <tt>0 0</tt>. |
| 456 | </p> |
| 457 | </dd> |
| 458 | <dt> |
| 459 | --shortstat |
| 460 | </dt> |
| 461 | <dd> |
| 462 | <p> |
| 463 | Output only the last line of the --stat format containing total |
| 464 | number of modified files, as well as number of added and deleted |
| 465 | lines. |
| 466 | </p> |
| 467 | </dd> |
| 468 | <dt> |
Junio C Hamano | 6a45be9 | 2008-04-22 08:19:03 | [diff] [blame] | 469 | --dirstat[=limit] |
| 470 | </dt> |
| 471 | <dd> |
| 472 | <p> |
| 473 | Output only the sub-directories that are impacted by a diff, |
| 474 | and to what degree they are impacted. You can override the |
| 475 | default cut-off in percent (3) by "--dirstat=limit". If you |
| 476 | want to enable "cumulative" directory statistics, you can use |
| 477 | the "--cumulative" flag, which adds up percentages recursively |
| 478 | even when they have been already reported for a sub-directory. |
| 479 | </p> |
| 480 | </dd> |
| 481 | <dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 482 | --summary |
| 483 | </dt> |
| 484 | <dd> |
| 485 | <p> |
| 486 | Output a condensed summary of extended header information |
| 487 | such as creations, renames and mode changes. |
| 488 | </p> |
| 489 | </dd> |
| 490 | <dt> |
| 491 | --patch-with-stat |
| 492 | </dt> |
| 493 | <dd> |
| 494 | <p> |
| 495 | Synonym for "-p --stat". |
Junio C Hamano | ff97979 | 2007-11-16 10:11:30 | [diff] [blame] | 496 | This is the default. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 497 | </p> |
| 498 | </dd> |
| 499 | <dt> |
| 500 | -z |
| 501 | </dt> |
| 502 | <dd> |
| 503 | <p> |
Junio C Hamano | b968dbb | 2007-07-27 07:26:40 | [diff] [blame] | 504 | NUL-line termination on output. This affects the --raw |
| 505 | output field terminator. Also output from commands such |
| 506 | as "git-log" will be delimited with NUL between commits. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 507 | </p> |
| 508 | </dd> |
| 509 | <dt> |
| 510 | --name-only |
| 511 | </dt> |
| 512 | <dd> |
| 513 | <p> |
| 514 | Show only names of changed files. |
| 515 | </p> |
| 516 | </dd> |
| 517 | <dt> |
| 518 | --name-status |
| 519 | </dt> |
| 520 | <dd> |
| 521 | <p> |
Junio C Hamano | a9aee78 | 2008-04-23 16:09:20 | [diff] [blame] | 522 | Show only names and status of changed files. See the description |
| 523 | of the <tt>--diff-filter</tt> option on what the status letters mean. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 524 | </p> |
| 525 | </dd> |
| 526 | <dt> |
| 527 | --color |
| 528 | </dt> |
| 529 | <dd> |
| 530 | <p> |
| 531 | Show colored diff. |
| 532 | </p> |
| 533 | </dd> |
| 534 | <dt> |
| 535 | --no-color |
| 536 | </dt> |
| 537 | <dd> |
| 538 | <p> |
| 539 | Turn off colored diff, even when the configuration file |
| 540 | gives the default to color output. |
| 541 | </p> |
| 542 | </dd> |
| 543 | <dt> |
| 544 | --color-words |
| 545 | </dt> |
| 546 | <dd> |
| 547 | <p> |
| 548 | Show colored word diff, i.e. color words which have changed. |
| 549 | </p> |
| 550 | </dd> |
| 551 | <dt> |
| 552 | --no-renames |
| 553 | </dt> |
| 554 | <dd> |
| 555 | <p> |
| 556 | Turn off rename detection, even when the configuration |
| 557 | file gives the default to do so. |
| 558 | </p> |
| 559 | </dd> |
| 560 | <dt> |
| 561 | --check |
| 562 | </dt> |
| 563 | <dd> |
| 564 | <p> |
| 565 | Warn if changes introduce trailing whitespace |
Junio C Hamano | 3dac504 | 2007-12-15 08:40:54 | [diff] [blame] | 566 | or an indent that uses a space before a tab. Exits with |
| 567 | non-zero status if problems are found. Not compatible with |
| 568 | --exit-code. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 569 | </p> |
| 570 | </dd> |
| 571 | <dt> |
| 572 | --full-index |
| 573 | </dt> |
| 574 | <dd> |
| 575 | <p> |
| 576 | Instead of the first handful characters, show full |
| 577 | object name of pre- and post-image blob on the "index" |
| 578 | line when generating a patch format output. |
| 579 | </p> |
| 580 | </dd> |
| 581 | <dt> |
| 582 | --binary |
| 583 | </dt> |
| 584 | <dd> |
| 585 | <p> |
| 586 | In addition to --full-index, output "binary diff" that |
| 587 | can be applied with "git apply". |
| 588 | </p> |
| 589 | </dd> |
| 590 | <dt> |
| 591 | --abbrev[=<n>] |
| 592 | </dt> |
| 593 | <dd> |
| 594 | <p> |
| 595 | Instead of showing the full 40-byte hexadecimal object |
| 596 | name in diff-raw format output and diff-tree header |
| 597 | lines, show only handful hexdigits prefix. This is |
| 598 | independent of --full-index option above, which controls |
| 599 | the diff-patch output format. Non default number of |
| 600 | digits can be specified with --abbrev=<n>. |
| 601 | </p> |
| 602 | </dd> |
| 603 | <dt> |
| 604 | -B |
| 605 | </dt> |
| 606 | <dd> |
| 607 | <p> |
| 608 | Break complete rewrite changes into pairs of delete and create. |
| 609 | </p> |
| 610 | </dd> |
| 611 | <dt> |
| 612 | -M |
| 613 | </dt> |
| 614 | <dd> |
| 615 | <p> |
| 616 | Detect renames. |
| 617 | </p> |
| 618 | </dd> |
| 619 | <dt> |
| 620 | -C |
| 621 | </dt> |
| 622 | <dd> |
| 623 | <p> |
Junio C Hamano | 16f9887 | 2007-06-12 16:09:14 | [diff] [blame] | 624 | Detect copies as well as renames. See also <tt>--find-copies-harder</tt>. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 625 | </p> |
| 626 | </dd> |
| 627 | <dt> |
| 628 | --diff-filter=[ACDMRTUXB*] |
| 629 | </dt> |
| 630 | <dd> |
| 631 | <p> |
| 632 | Select only files that are Added (<tt>A</tt>), Copied (<tt>C</tt>), |
| 633 | Deleted (<tt>D</tt>), Modified (<tt>M</tt>), Renamed (<tt>R</tt>), have their |
| 634 | type (mode) changed (<tt>T</tt>), are Unmerged (<tt>U</tt>), are |
| 635 | Unknown (<tt>X</tt>), or have had their pairing Broken (<tt>B</tt>). |
| 636 | Any combination of the filter characters may be used. |
| 637 | When <tt>*</tt> (All-or-none) is added to the combination, all |
| 638 | paths are selected if there is any file that matches |
| 639 | other criteria in the comparison; if there is no file |
| 640 | that matches other criteria, nothing is selected. |
| 641 | </p> |
| 642 | </dd> |
| 643 | <dt> |
| 644 | --find-copies-harder |
| 645 | </dt> |
| 646 | <dd> |
| 647 | <p> |
Junio C Hamano | 16f9887 | 2007-06-12 16:09:14 | [diff] [blame] | 648 | For performance reasons, by default, <tt>-C</tt> option finds copies only |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 649 | if the original file of the copy was modified in the same |
| 650 | changeset. This flag makes the command |
| 651 | inspect unmodified files as candidates for the source of |
| 652 | copy. This is a very expensive operation for large |
Junio C Hamano | 16f9887 | 2007-06-12 16:09:14 | [diff] [blame] | 653 | projects, so use it with caution. Giving more than one |
| 654 | <tt>-C</tt> option has the same effect. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 655 | </p> |
| 656 | </dd> |
| 657 | <dt> |
| 658 | -l<num> |
| 659 | </dt> |
| 660 | <dd> |
| 661 | <p> |
| 662 | -M and -C options require O(n^2) processing time where n |
| 663 | is the number of potential rename/copy targets. This |
| 664 | option prevents rename/copy detection from running if |
| 665 | the number of rename/copy targets exceeds the specified |
| 666 | number. |
| 667 | </p> |
| 668 | </dd> |
| 669 | <dt> |
| 670 | -S<string> |
| 671 | </dt> |
| 672 | <dd> |
| 673 | <p> |
| 674 | Look for differences that contain the change in <string>. |
| 675 | </p> |
| 676 | </dd> |
| 677 | <dt> |
| 678 | --pickaxe-all |
| 679 | </dt> |
| 680 | <dd> |
| 681 | <p> |
| 682 | When -S finds a change, show all the changes in that |
| 683 | changeset, not just the files that contain the change |
| 684 | in <string>. |
| 685 | </p> |
| 686 | </dd> |
| 687 | <dt> |
| 688 | --pickaxe-regex |
| 689 | </dt> |
| 690 | <dd> |
| 691 | <p> |
| 692 | Make the <string> not a plain string but an extended POSIX |
| 693 | regex to match. |
| 694 | </p> |
| 695 | </dd> |
| 696 | <dt> |
| 697 | -O<orderfile> |
| 698 | </dt> |
| 699 | <dd> |
| 700 | <p> |
| 701 | Output the patch in the order specified in the |
| 702 | <orderfile>, which has one shell glob pattern per line. |
| 703 | </p> |
| 704 | </dd> |
| 705 | <dt> |
| 706 | -R |
| 707 | </dt> |
| 708 | <dd> |
| 709 | <p> |
| 710 | Swap two inputs; that is, show differences from index or |
| 711 | on-disk file to tree contents. |
| 712 | </p> |
| 713 | </dd> |
| 714 | <dt> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 715 | --relative[=<path>] |
| 716 | </dt> |
| 717 | <dd> |
| 718 | <p> |
| 719 | When run from a subdirectory of the project, it can be |
| 720 | told to exclude changes outside the directory and show |
| 721 | pathnames relative to it with this option. When you are |
| 722 | not in a subdirectory (e.g. in a bare repository), you |
| 723 | can name which subdirectory to make the output relative |
| 724 | to by giving a <path> as an argument. |
| 725 | </p> |
| 726 | </dd> |
| 727 | <dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 728 | --text |
| 729 | </dt> |
| 730 | <dd> |
| 731 | <p> |
| 732 | Treat all files as text. |
| 733 | </p> |
| 734 | </dd> |
| 735 | <dt> |
| 736 | -a |
| 737 | </dt> |
| 738 | <dd> |
| 739 | <p> |
| 740 | Shorthand for "--text". |
| 741 | </p> |
| 742 | </dd> |
| 743 | <dt> |
| 744 | --ignore-space-at-eol |
| 745 | </dt> |
| 746 | <dd> |
| 747 | <p> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 748 | Ignore changes in whitespace at EOL. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 749 | </p> |
| 750 | </dd> |
| 751 | <dt> |
| 752 | --ignore-space-change |
| 753 | </dt> |
| 754 | <dd> |
| 755 | <p> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 756 | Ignore changes in amount of whitespace. This ignores whitespace |
| 757 | at line end, and considers all other sequences of one or |
| 758 | more whitespace characters to be equivalent. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 759 | </p> |
| 760 | </dd> |
| 761 | <dt> |
| 762 | -b |
| 763 | </dt> |
| 764 | <dd> |
| 765 | <p> |
| 766 | Shorthand for "--ignore-space-change". |
| 767 | </p> |
| 768 | </dd> |
| 769 | <dt> |
| 770 | --ignore-all-space |
| 771 | </dt> |
| 772 | <dd> |
| 773 | <p> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 774 | Ignore whitespace when comparing lines. This ignores |
| 775 | differences even if one line has whitespace where the other |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 776 | line has none. |
| 777 | </p> |
| 778 | </dd> |
| 779 | <dt> |
| 780 | -w |
| 781 | </dt> |
| 782 | <dd> |
| 783 | <p> |
| 784 | Shorthand for "--ignore-all-space". |
| 785 | </p> |
| 786 | </dd> |
Junio C Hamano | 48fd2f6 | 2007-03-19 02:02:30 | [diff] [blame] | 787 | <dt> |
| 788 | --exit-code |
| 789 | </dt> |
| 790 | <dd> |
| 791 | <p> |
| 792 | Make the program exit with codes similar to diff(1). |
| 793 | That is, it exits with 1 if there were differences and |
| 794 | 0 means no differences. |
| 795 | </p> |
| 796 | </dd> |
Junio C Hamano | 35e5755 | 2007-03-25 07:54:35 | [diff] [blame] | 797 | <dt> |
| 798 | --quiet |
| 799 | </dt> |
| 800 | <dd> |
| 801 | <p> |
| 802 | Disable all output of the program. Implies --exit-code. |
| 803 | </p> |
| 804 | </dd> |
Junio C Hamano | bb0f404 | 2007-07-04 06:41:40 | [diff] [blame] | 805 | <dt> |
| 806 | --ext-diff |
| 807 | </dt> |
| 808 | <dd> |
| 809 | <p> |
| 810 | Allow an external diff helper to be executed. If you set an |
Junio C Hamano | 1b50ce9 | 2007-10-03 12:05:53 | [diff] [blame] | 811 | external diff driver with <a href="gitattributes.html">gitattributes(5)</a>, you need |
| 812 | to use this option with <a href="git-log.html">git-log(1)</a> and friends. |
Junio C Hamano | bb0f404 | 2007-07-04 06:41:40 | [diff] [blame] | 813 | </p> |
| 814 | </dd> |
| 815 | <dt> |
| 816 | --no-ext-diff |
| 817 | </dt> |
| 818 | <dd> |
| 819 | <p> |
| 820 | Disallow external diff drivers. |
| 821 | </p> |
| 822 | </dd> |
Junio C Hamano | e27cbd2 | 2007-12-21 17:57:33 | [diff] [blame] | 823 | <dt> |
Junio C Hamano | dfccbb0 | 2008-05-26 01:16:14 | [diff] [blame] | 824 | --ignore-submodules |
| 825 | </dt> |
| 826 | <dd> |
| 827 | <p> |
| 828 | Ignore changes to submodules in the diff generation. |
| 829 | </p> |
| 830 | </dd> |
| 831 | <dt> |
Junio C Hamano | e27cbd2 | 2007-12-21 17:57:33 | [diff] [blame] | 832 | --src-prefix=<prefix> |
| 833 | </dt> |
| 834 | <dd> |
| 835 | <p> |
| 836 | Show the given source prefix instead of "a/". |
| 837 | </p> |
| 838 | </dd> |
| 839 | <dt> |
| 840 | --dst-prefix=<prefix> |
| 841 | </dt> |
| 842 | <dd> |
| 843 | <p> |
| 844 | Show the given destination prefix instead of "b/". |
| 845 | </p> |
| 846 | </dd> |
| 847 | <dt> |
| 848 | --no-prefix |
| 849 | </dt> |
| 850 | <dd> |
| 851 | <p> |
| 852 | Do not show any source or destination prefix. |
| 853 | </p> |
| 854 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 855 | </dl></div> |
| 856 | <div class="para"><p>For more detailed explanation on these common options, see also |
| 857 | <a href="gitdiffcore.html">gitdiffcore(7)</a>.</p></div> |
| 858 | <div class="vlist"><dl> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 859 | <dt> |
Junio C Hamano | bb0f404 | 2007-07-04 06:41:40 | [diff] [blame] | 860 | -<n> |
| 861 | </dt> |
| 862 | <dd> |
| 863 | <p> |
| 864 | Limits the number of patches to prepare. |
| 865 | </p> |
| 866 | </dd> |
| 867 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 868 | -o <dir> |
| 869 | </dt> |
| 870 | <dt> |
| 871 | --output-directory <dir> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 872 | </dt> |
| 873 | <dd> |
| 874 | <p> |
| 875 | Use <dir> to store the resulting files, instead of the |
Junio C Hamano | 1bab4b0 | 2006-06-06 21:58:33 | [diff] [blame] | 876 | current working directory. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 877 | </p> |
| 878 | </dd> |
| 879 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 880 | -n |
| 881 | </dt> |
| 882 | <dt> |
| 883 | --numbered |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 884 | </dt> |
| 885 | <dd> |
| 886 | <p> |
| 887 | Name output in <em>[PATCH n/m]</em> format. |
| 888 | </p> |
| 889 | </dd> |
| 890 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 891 | -N |
| 892 | </dt> |
| 893 | <dt> |
| 894 | --no-numbered |
Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 895 | </dt> |
| 896 | <dd> |
| 897 | <p> |
| 898 | Name output in <em>[PATCH]</em> format. |
| 899 | </p> |
| 900 | </dd> |
| 901 | <dt> |
Junio C Hamano | 341071d | 2006-06-04 07:24:48 | [diff] [blame] | 902 | --start-number <n> |
| 903 | </dt> |
| 904 | <dd> |
| 905 | <p> |
| 906 | Start numbering the patches at <n> instead of 1. |
| 907 | </p> |
| 908 | </dd> |
| 909 | <dt> |
Junio C Hamano | 94cad1a | 2007-06-06 10:48:25 | [diff] [blame] | 910 | --numbered-files |
| 911 | </dt> |
| 912 | <dd> |
| 913 | <p> |
| 914 | Output file names will be a simple number sequence |
| 915 | without the default first line of the commit appended. |
| 916 | Mutually exclusive with the --stdout option. |
| 917 | </p> |
| 918 | </dd> |
| 919 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 920 | -k |
| 921 | </dt> |
| 922 | <dt> |
| 923 | --keep-subject |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 924 | </dt> |
| 925 | <dd> |
| 926 | <p> |
| 927 | Do not strip/add <em>[PATCH]</em> from the first line of the |
| 928 | commit log message. |
| 929 | </p> |
| 930 | </dd> |
| 931 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 932 | -s |
| 933 | </dt> |
| 934 | <dt> |
| 935 | --signoff |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 936 | </dt> |
| 937 | <dd> |
| 938 | <p> |
| 939 | Add <tt>Signed-off-by:</tt> line to the commit message, using |
| 940 | the committer identity of yourself. |
| 941 | </p> |
| 942 | </dd> |
| 943 | <dt> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 944 | --stdout |
| 945 | </dt> |
| 946 | <dd> |
| 947 | <p> |
Junio C Hamano | 341071d | 2006-06-04 07:24:48 | [diff] [blame] | 948 | Print all commits to the standard output in mbox format, |
| 949 | instead of creating a file for each one. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 950 | </p> |
| 951 | </dd> |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 952 | <dt> |
Junio C Hamano | c51fede | 2007-03-12 07:29:20 | [diff] [blame] | 953 | --attach[=<boundary>] |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 954 | </dt> |
| 955 | <dd> |
| 956 | <p> |
Junio C Hamano | c51fede | 2007-03-12 07:29:20 | [diff] [blame] | 957 | Create multipart/mixed attachment, the first part of |
| 958 | which is the commit message and the patch itself in the |
| 959 | second part, with "Content-Disposition: attachment". |
| 960 | </p> |
| 961 | </dd> |
| 962 | <dt> |
| 963 | --inline[=<boundary>] |
| 964 | </dt> |
| 965 | <dd> |
| 966 | <p> |
| 967 | Create multipart/mixed attachment, the first part of |
| 968 | which is the commit message and the patch itself in the |
| 969 | second part, with "Content-Disposition: inline". |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 970 | </p> |
| 971 | </dd> |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 972 | <dt> |
| 973 | --thread |
| 974 | </dt> |
| 975 | <dd> |
| 976 | <p> |
| 977 | Add In-Reply-To and References headers to make the second and |
| 978 | subsequent mails appear as replies to the first. Also generates |
| 979 | the Message-Id header to reference. |
| 980 | </p> |
| 981 | </dd> |
| 982 | <dt> |
| 983 | --in-reply-to=Message-Id |
| 984 | </dt> |
| 985 | <dd> |
| 986 | <p> |
| 987 | Make the first mail (or all the mails with --no-thread) appear as a |
| 988 | reply to the given Message-Id, which avoids breaking threads to |
| 989 | provide a new patch series. |
| 990 | </p> |
| 991 | </dd> |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 992 | <dt> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 993 | --ignore-if-in-upstream |
| 994 | </dt> |
| 995 | <dd> |
| 996 | <p> |
| 997 | Do not include a patch that matches a commit in |
| 998 | <until>..<since>. This will examine all patches reachable |
| 999 | from <since> but not from <until> and compare them with the |
| 1000 | patches being generated, and any patch that matches is |
| 1001 | ignored. |
| 1002 | </p> |
| 1003 | </dd> |
| 1004 | <dt> |
Junio C Hamano | 6f1cca8 | 2007-04-12 05:02:47 | [diff] [blame] | 1005 | --subject-prefix=<Subject-Prefix> |
| 1006 | </dt> |
| 1007 | <dd> |
| 1008 | <p> |
| 1009 | Instead of the standard <em>[PATCH]</em> prefix in the subject |
| 1010 | line, instead use <em>[<Subject-Prefix>]</em>. This |
| 1011 | allows for useful naming of a patch series, and can be |
| 1012 | combined with the --numbered option. |
| 1013 | </p> |
| 1014 | </dd> |
| 1015 | <dt> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1016 | --cc=<email> |
| 1017 | </dt> |
| 1018 | <dd> |
| 1019 | <p> |
| 1020 | Add a "Cc:" header to the email headers. This is in addition |
| 1021 | to any configured headers, and may be used multiple times. |
| 1022 | </p> |
| 1023 | </dd> |
| 1024 | <dt> |
| 1025 | --cover-letter |
| 1026 | </dt> |
| 1027 | <dd> |
| 1028 | <p> |
| 1029 | Generate a cover letter template. You still have to fill in |
| 1030 | a description, but the shortlog and the diffstat will be |
| 1031 | generated for you. |
| 1032 | </p> |
| 1033 | </dd> |
| 1034 | <dt> |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 1035 | --suffix=.<sfx> |
| 1036 | </dt> |
| 1037 | <dd> |
| 1038 | <p> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 1039 | Instead of using <tt>.patch</tt> as the suffix for generated |
Junio C Hamano | a638742 | 2007-08-25 03:54:27 | [diff] [blame] | 1040 | filenames, use specified suffix. A common alternative is |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 1041 | <tt>--suffix=.txt</tt>. |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 1042 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1043 | <div class="para"><p>Note that you would need to include the leading dot <tt>.</tt> if you |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 1044 | want a filename like <tt>0001-description-of-my-change.patch</tt>, and |
| 1045 | the first letter does not have to be a dot. Leaving it empty would |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1046 | not add any suffix.</p></div> |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 1047 | </dd> |
Junio C Hamano | 869bb80 | 2008-05-12 00:29:47 | [diff] [blame] | 1048 | <dt> |
| 1049 | --no-binary |
| 1050 | </dt> |
| 1051 | <dd> |
| 1052 | <p> |
| 1053 | Don't output contents of changes in binary files, just take note |
| 1054 | that they differ. Note that this disable the patch to be properly |
| 1055 | applied. By default the contents of changes in those files are |
| 1056 | encoded in the patch. |
| 1057 | </p> |
| 1058 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1059 | </dl></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1060 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1061 | <h2 id="_configuration">CONFIGURATION</h2> |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 1062 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1063 | <div class="para"><p>You can specify extra mail header lines to be added to each message |
Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 1064 | in the repository configuration, new defaults for the subject prefix |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1065 | and file suffix, and number patches when outputting more than one.</p></div> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 1066 | <div class="listingblock"> |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 1067 | <div class="content"> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 1068 | <pre><tt>[format] |
| 1069 | headers = "Organization: git-foo\n" |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1070 | subjectprefix = CHANGE |
Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 1071 | suffix = .txt |
Junio C Hamano | 2fbcd21 | 2008-05-14 22:26:07 | [diff] [blame] | 1072 | numbered = auto |
| 1073 | cc = <email></tt></pre> |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 1074 | </div></div> |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 1075 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1076 | <h2 id="_examples">EXAMPLES</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1077 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1078 | <div class="ilist"><ul> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1079 | <li> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1080 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1081 | Extract commits between revisions R1 and R2, and apply them on top of |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1082 | the current branch using <em>git-am</em> to cherry-pick them: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1083 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1084 | <div class="listingblock"> |
| 1085 | <div class="content"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1086 | <pre><tt>$ git format-patch -k --stdout R1..R2 | git am -3 -k</tt></pre> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1087 | </div></div> |
| 1088 | </li> |
| 1089 | <li> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1090 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1091 | Extract all commits which are in the current branch but not in the |
| 1092 | origin branch: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1093 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1094 | <div class="listingblock"> |
| 1095 | <div class="content"> |
| 1096 | <pre><tt>$ git format-patch origin</tt></pre> |
| 1097 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1098 | <div class="para"><p>For each commit a separate file is created in the current directory.</p></div> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1099 | </li> |
| 1100 | <li> |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 1101 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1102 | Extract all commits that lead to <em>origin</em> since the inception of the |
| 1103 | project: |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 1104 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1105 | <div class="listingblock"> |
| 1106 | <div class="content"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1107 | <pre><tt>$ git format-patch --root origin</tt></pre> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1108 | </div></div> |
| 1109 | </li> |
| 1110 | <li> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1111 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1112 | The same as the previous one: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1113 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1114 | <div class="listingblock"> |
| 1115 | <div class="content"> |
| 1116 | <pre><tt>$ git format-patch -M -B origin</tt></pre> |
| 1117 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1118 | <div class="para"><p>Additionally, it detects and handles renames and complete rewrites |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1119 | intelligently to produce a renaming patch. A renaming patch reduces |
| 1120 | the amount of text output, and generally makes it easier to review it. |
| 1121 | Note that the "patch" program does not understand renaming patches, so |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1122 | use it only when you know the recipient uses git to apply your patch.</p></div> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1123 | </li> |
| 1124 | <li> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 1125 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1126 | Extract three topmost commits from the current branch and format them |
| 1127 | as e-mailable patches: |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 1128 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1129 | <div class="listingblock"> |
| 1130 | <div class="content"> |
| 1131 | <pre><tt>$ git format-patch -3</tt></pre> |
| 1132 | </div></div> |
| 1133 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1134 | </ul></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1135 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1136 | <h2 id="_see_also">SEE ALSO</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1137 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1138 | <div class="para"><p><a href="git-am.html">git-am(1)</a>, <a href="git-send-email.html">git-send-email(1)</a></p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1139 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1140 | <h2 id="_author">Author</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1141 | <div class="sectionbody"> |
Junio C Hamano | 0868a30 | 2008-07-22 09:20:44 | [diff] [blame] | 1142 | <div class="para"><p>Written by Junio C Hamano <gitster@pobox.com></p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1143 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1144 | <h2 id="_documentation">Documentation</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1145 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1146 | <div class="para"><p>Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1147 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1148 | <h2 id="_git">GIT</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1149 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1150 | <div class="para"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1151 | </div> |
| 1152 | <div id="footer"> |
| 1153 | <div id="footer-text"> |
Junio C Hamano | 0868a30 | 2008-07-22 09:20:44 | [diff] [blame] | 1154 | Last updated 2008-07-22 09:19:09 UTC |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1155 | </div> |
| 1156 | </div> |
| 1157 | </body> |
| 1158 | </html> |